package com.zzh.ideas.web.framework.handler;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import java.util.List;

/**
 * description: <br>
 * createTime: 2019/12/510:01 <br>
 *
 * @author zzh
 */

//@Configuration
public class MyWebMvcConfigurerAdapter extends WebMvcConfigurerAdapter {

    @Autowired
    private ApiArgumentResolver apiArgumentResolver;

    //@Override
    //public void addInterceptors(InterceptorRegistry registry) {
    //registry.addInterceptor(new TokenInterceptor()).addPathPatterns("/user/*").excludePathPatterns("/user/getone2");
    //}


    @Override
    public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) {
        argumentResolvers.add(apiArgumentResolver);
    }
}